import request from '@/utils/request'

// 查询量化列表
export function listAppLuckyDraw(query) {
  return request({
    url: '/customer/v1/app/lucky/draw/page',
    method: 'post',
    data: query
  })
}

// 查询量化详细
export function getAppLuckyDraw(id, lang) {
  return request({
    url: '/customer/v1/app/lucky/draw?id=' + id + '&lang=' + lang,
    method: 'get'
  })
}

// 新增量化
export function addAppLuckyDraw(data) {
  return request({
    url: '/customer/v1/app/lucky/draw',
    method: 'post',
    data: data
  })
}

// 修改量化
export function updateAppLuckyDraw(data) {
  return request({
    url: '/customer/v1/app/lucky/draw',
    method: 'put',
    data: data
  })
}

// 删除量化
export function delAppLuckyDraw(id) {
  return request({
    url: '/customer/v1/app/lucky/draw/' + id,
    method: 'delete'
  })
}

// 查询量化列表
export function getListAppLuckyDraw(appId) {
  return request({
    url: '/customer/v1/app/lucky/draw/app_list?app_id=' + appId,
    method: 'get',
  })
}

// 翻译抽奖数据
export function translateAppLuckyDraw(id) {
  return request({
    url: '/customer/v1/app/lucky/draw/translate?id=' + id,
    method: 'post',
    timeout: 60 * 60 * 1000
  })
}
